.class public final Lcom/burstly/lib/component/ComponentQueue;
.super Ljava/lang/Object;
.source "ComponentQueue.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/burstly/lib/component/ComponentQueue$IQueueComponentListener;
    }
.end annotation


# static fields
.field public static final ADVERTISE:Ljava/lang/String; = "advertise"

.field public static final CONTEXT:Ljava/lang/String; = "context"

.field private static final LOG:Lcom/burstly/lib/util/LoggerExt; = null

.field public static final RESPONSE_SAVER:Ljava/lang/String; = "responseSaver"

.field private static final TAG:Ljava/lang/String; = "ComponentQueue"


# instance fields
.field private mBurstlyAdListener:Lcom/burstly/lib/component/IInternalBurstlyAdListener;

.field final mBurstlyView:Lcom/burstly/lib/ui/BurstlyView;

.field private mClientTargetingParams:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field mComponentQueueListener:Lcom/burstly/lib/component/ComponentQueue$IQueueComponentListener;

.field mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

.field mCurrentElement:Lcom/burstly/lib/component/ComponentQueueElement;

.field private mCustomNetworkParams:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "*>;>;"
        }
    .end annotation
.end field

.field mFailedToShow:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<",
            "Lcom/burstly/lib/component/FailedToShow;",
            ">;"
        }
    .end annotation
.end field

.field final mFullRequestData:Lcom/burstly/lib/network/beans/RequestData;

.field private mIsInterstitial:Ljava/lang/Boolean;

.field private mIsStopped:Z

.field private final mLcListener:Lcom/burstly/lib/component/IAdaptorController$IComponentQueueLifecycleListener;

.field final mQueueElements:Ljava/util/LinkedList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/LinkedList",
            "<",
            "Lcom/burstly/lib/component/ComponentQueueElement;",
            ">;"
        }
    .end annotation
.end field

.field mResponseSaver:Lcom/burstly/lib/persistance/ResponseSaver;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/burstly/lib/persistance/ResponseSaver",
            "<",
            "Lcom/burstly/lib/network/beans/ResponseBean;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 63
    invoke-static {}, Lcom/burstly/lib/util/LoggerExt;->getInstance()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/ComponentQueue;->LOG:Lcom/burstly/lib/util/LoggerExt;

    return-void
.end method

.method public constructor <init>(Ljava/util/Collection;Lcom/burstly/lib/network/beans/RequestData;Lcom/burstly/lib/ui/BurstlyView;Lcom/burstly/lib/persistance/ResponseSaver;)V
    .locals 1
    .parameter
    .parameter "fullRequestData"
    .parameter "parent"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Collection",
            "<",
            "Lcom/burstly/lib/component/ComponentQueueElement;",
            ">;",
            "Lcom/burstly/lib/network/beans/RequestData;",
            "Lcom/burstly/lib/ui/BurstlyView;",
            "Lcom/burstly/lib/persistance/ResponseSaver",
            "<",
            "Lcom/burstly/lib/network/beans/ResponseBean;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 186
    .local p1, components:Ljava/util/Collection;,"Ljava/util/Collection<Lcom/burstly/lib/component/ComponentQueueElement;>;"
    .local p4, responseSaver:Lcom/burstly/lib/persistance/ResponseSaver;,"Lcom/burstly/lib/persistance/ResponseSaver<Lcom/burstly/lib/network/beans/ResponseBean;>;"
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 137
    new-instance v0, Lcom/burstly/lib/component/ComponentQueue$1;

    invoke-direct {v0, p0}, Lcom/burstly/lib/component/ComponentQueue$1;-><init>(Lcom/burstly/lib/component/ComponentQueue;)V

    iput-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mLcListener:Lcom/burstly/lib/component/IAdaptorController$IComponentQueueLifecycleListener;

    .line 187
    const-string v0, "Queue components can not be null!"

    invoke-static {v0, p1}, Ljunit/framework/Assert;->assertNotNull(Ljava/lang/String;Ljava/lang/Object;)V

    .line 188
    const-string v0, "Queue fullRequestData can not be null!"

    invoke-static {v0, p2}, Ljunit/framework/Assert;->assertNotNull(Ljava/lang/String;Ljava/lang/Object;)V

    .line 189
    const-string v0, "Parent can not be null!"

    invoke-static {v0, p3}, Ljunit/framework/Assert;->assertNotNull(Ljava/lang/String;Ljava/lang/Object;)V

    .line 190
    iput-object p3, p0, Lcom/burstly/lib/component/ComponentQueue;->mBurstlyView:Lcom/burstly/lib/ui/BurstlyView;

    .line 191
    iput-object p2, p0, Lcom/burstly/lib/component/ComponentQueue;->mFullRequestData:Lcom/burstly/lib/network/beans/RequestData;

    .line 192
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0, p1}, Ljava/util/LinkedList;-><init>(Ljava/util/Collection;)V

    iput-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mQueueElements:Ljava/util/LinkedList;

    .line 193
    iput-object p4, p0, Lcom/burstly/lib/component/ComponentQueue;->mResponseSaver:Lcom/burstly/lib/persistance/ResponseSaver;

    .line 194
    return-void
.end method

.method static synthetic access$000()Lcom/burstly/lib/util/LoggerExt;
    .locals 1

    .prologue
    .line 38
    sget-object v0, Lcom/burstly/lib/component/ComponentQueue;->LOG:Lcom/burstly/lib/util/LoggerExt;

    return-object v0
.end method

.method private configureCurrentComponent()V
    .locals 2

    .prologue
    .line 292
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

    iget-object v1, p0, Lcom/burstly/lib/component/ComponentQueue;->mBurstlyView:Lcom/burstly/lib/ui/BurstlyView;

    invoke-interface {v0, v1}, Lcom/burstly/lib/component/IAdaptorController;->setParent(Lcom/burstly/lib/ui/BurstlyView;)V

    .line 293
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

    iget-object v1, p0, Lcom/burstly/lib/component/ComponentQueue;->mLcListener:Lcom/burstly/lib/component/IAdaptorController$IComponentQueueLifecycleListener;

    invoke-interface {v0, v1}, Lcom/burstly/lib/component/IAdaptorController;->setLifeCycleListener(Lcom/burstly/lib/component/IAdaptorController$IComponentQueueLifecycleListener;)V

    .line 294
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

    iget-object v1, p0, Lcom/burstly/lib/component/ComponentQueue;->mBurstlyAdListener:Lcom/burstly/lib/component/IInternalBurstlyAdListener;

    invoke-interface {v0, v1}, Lcom/burstly/lib/component/IAdaptorController;->setBursltlyAdListener(Lcom/burstly/lib/component/IInternalBurstlyAdListener;)V

    .line 295
    return-void
.end method

.method private createControllerParameters()Ljava/util/Map;
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 251
    new-instance v0, Ljava/util/HashMap;

    const/4 v1, 0x5

    invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(I)V

    .line 252
    .local v0, args:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v1, "context"

    iget-object v2, p0, Lcom/burstly/lib/component/ComponentQueue;->mBurstlyView:Lcom/burstly/lib/ui/BurstlyView;

    invoke-virtual {v2}, Lcom/burstly/lib/ui/BurstlyView;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 254
    const-string v1, "advertise"

    iget-object v2, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentElement:Lcom/burstly/lib/component/ComponentQueueElement;

    invoke-virtual {v2}, Lcom/burstly/lib/component/ComponentQueueElement;->getCreativeData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 255
    const-string v1, "responseSaver"

    iget-object v2, p0, Lcom/burstly/lib/component/ComponentQueue;->mResponseSaver:Lcom/burstly/lib/persistance/ResponseSaver;

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 256
    return-object v0
.end method

.method private getController()Lcom/burstly/lib/component/IAdaptorController;
    .locals 10

    .prologue
    .line 224
    const/4 v1, 0x0

    .line 225
    .local v1, controller:Lcom/burstly/lib/component/IAdaptorController;
    :goto_0
    iget-object v4, p0, Lcom/burstly/lib/component/ComponentQueue;->mQueueElements:Ljava/util/LinkedList;

    invoke-virtual {v4}, Ljava/util/LinkedList;->poll()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/burstly/lib/component/ComponentQueueElement;

    iput-object v4, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentElement:Lcom/burstly/lib/component/ComponentQueueElement;

    if-eqz v4, :cond_2

    .line 226
    invoke-direct {p0}, Lcom/burstly/lib/component/ComponentQueue;->createControllerParameters()Ljava/util/Map;

    move-result-object v0

    .line 227
    .local v0, args:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    iget-object v4, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentElement:Lcom/burstly/lib/component/ComponentQueueElement;

    invoke-virtual {v4, v0}, Lcom/burstly/lib/component/ComponentQueueElement;->getController(Ljava/util/Map;)Lcom/burstly/lib/component/IAdaptorController;

    move-result-object v1

    .line 228
    if-eqz v1, :cond_1

    .line 229
    invoke-interface {v1}, Lcom/burstly/lib/component/IAdaptorController;->getNetworkName()Ljava/lang/String;

    move-result-object v3

    .line 230
    .local v3, networkName:Ljava/lang/String;
    iget-object v4, p0, Lcom/burstly/lib/component/ComponentQueue;->mCustomNetworkParams:Ljava/util/Map;

    invoke-interface {v4, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/util/Map;

    invoke-interface {v1, v4}, Lcom/burstly/lib/component/IAdaptorController;->setCustomNetworkParams(Ljava/util/Map;)V

    .line 231
    iget-object v4, p0, Lcom/burstly/lib/component/ComponentQueue;->mIsInterstitial:Ljava/lang/Boolean;

    if-eqz v4, :cond_0

    .line 232
    iget-object v4, p0, Lcom/burstly/lib/component/ComponentQueue;->mIsInterstitial:Ljava/lang/Boolean;

    invoke-virtual {v4}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v4

    invoke-interface {v1, v4}, Lcom/burstly/lib/component/IAdaptorController;->setInterstitialMode(Z)V

    .line 234
    :cond_0
    iget-object v4, p0, Lcom/burstly/lib/component/ComponentQueue;->mClientTargetingParams:Ljava/util/Map;

    invoke-interface {v1, v4}, Lcom/burstly/lib/component/IAdaptorController;->setClientTargetParams(Ljava/util/Map;)V

    move-object v2, v1

    .line 242
    .end local v0           #args:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    .end local v1           #controller:Lcom/burstly/lib/component/IAdaptorController;
    .end local v3           #networkName:Ljava/lang/String;
    .local v2, controller:Lcom/burstly/lib/component/IAdaptorController;
    :goto_1
    return-object v2

    .line 238
    .end local v2           #controller:Lcom/burstly/lib/component/IAdaptorController;
    .restart local v0       #args:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    .restart local v1       #controller:Lcom/burstly/lib/component/IAdaptorController;
    :cond_1
    iget-object v4, p0, Lcom/burstly/lib/component/ComponentQueue;->mFailedToShow:Ljava/util/Set;

    new-instance v5, Lcom/burstly/lib/component/FailedToShow;

    iget-object v6, p0, Lcom/burstly/lib/component/ComponentQueue;->mFullRequestData:Lcom/burstly/lib/network/beans/RequestData;

    invoke-virtual {v6}, Lcom/burstly/lib/network/beans/RequestData;->getPublisher()Ljava/lang/String;

    move-result-object v6

    iget-object v7, p0, Lcom/burstly/lib/component/ComponentQueue;->mFullRequestData:Lcom/burstly/lib/network/beans/RequestData;

    invoke-virtual {v7}, Lcom/burstly/lib/network/beans/RequestData;->getZone()Ljava/lang/String;

    move-result-object v7

    iget-object v8, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentElement:Lcom/burstly/lib/component/ComponentQueueElement;

    invoke-virtual {v8}, Lcom/burstly/lib/component/ComponentQueueElement;->getCreativeData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v8

    invoke-virtual {v8}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getCrid()Ljava/lang/Integer;

    move-result-object v8

    invoke-direct {v5, v6, v7, v8}, Lcom/burstly/lib/component/FailedToShow;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V

    invoke-interface {v4, v5}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 240
    sget-object v4, Lcom/burstly/lib/component/ComponentQueue;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v5, "ComponentQueue"

    const-string v6, "{0} has been added to failed collector."

    const/4 v7, 0x1

    new-array v7, v7, [Ljava/lang/Object;

    const/4 v8, 0x0

    iget-object v9, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentElement:Lcom/burstly/lib/component/ComponentQueueElement;

    aput-object v9, v7, v8

    invoke-virtual {v4, v5, v6, v7}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    goto :goto_0

    .end local v0           #args:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :cond_2
    move-object v2, v1

    .line 242
    .end local v1           #controller:Lcom/burstly/lib/component/IAdaptorController;
    .restart local v2       #controller:Lcom/burstly/lib/component/IAdaptorController;
    goto :goto_1
.end method

.method private notifyComponentChange()V
    .locals 2

    .prologue
    .line 301
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mComponentQueueListener:Lcom/burstly/lib/component/ComponentQueue$IQueueComponentListener;

    if-eqz v0, :cond_0

    .line 302
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mComponentQueueListener:Lcom/burstly/lib/component/ComponentQueue$IQueueComponentListener;

    iget-object v1, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

    invoke-interface {v0, v1}, Lcom/burstly/lib/component/ComponentQueue$IQueueComponentListener;->componentChanged(Lcom/burstly/lib/component/IAdaptorController;)V

    .line 304
    :cond_0
    return-void
.end method


# virtual methods
.method public execute()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 200
    sget-object v0, Lcom/burstly/lib/component/ComponentQueue;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v1, "ComponentQueue"

    const-string v2, "Executing main queue..."

    new-array v3, v4, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 201
    iget-boolean v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mIsStopped:Z

    if-nez v0, :cond_1

    .line 202
    invoke-direct {p0}, Lcom/burstly/lib/component/ComponentQueue;->getController()Lcom/burstly/lib/component/IAdaptorController;

    move-result-object v0

    iput-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

    .line 203
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

    if-eqz v0, :cond_0

    .line 204
    invoke-direct {p0}, Lcom/burstly/lib/component/ComponentQueue;->configureCurrentComponent()V

    .line 205
    invoke-direct {p0}, Lcom/burstly/lib/component/ComponentQueue;->notifyComponentChange()V

    .line 206
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

    invoke-interface {v0}, Lcom/burstly/lib/component/IAdaptorController;->start()V

    .line 216
    :goto_0
    return-void

    .line 208
    :cond_0
    sget-object v0, Lcom/burstly/lib/component/ComponentQueue;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v1, "ComponentQueue"

    const-string v2, "No more components in queue."

    new-array v3, v4, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 211
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mComponentQueueListener:Lcom/burstly/lib/component/ComponentQueue$IQueueComponentListener;

    invoke-interface {v0}, Lcom/burstly/lib/component/ComponentQueue$IQueueComponentListener;->rerequestServer()V

    goto :goto_0

    .line 214
    :cond_1
    sget-object v0, Lcom/burstly/lib/component/ComponentQueue;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v1, "ComponentQueue"

    const-string v2, "Queue was stopped."

    new-array v3, v4, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    goto :goto_0
.end method

.method getCurrentComponent()Lcom/burstly/lib/component/IAdaptorController;
    .locals 1

    .prologue
    .line 327
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

    return-object v0
.end method

.method public getFaildToShowCollector()Ljava/util/Set;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Set",
            "<",
            "Lcom/burstly/lib/component/FailedToShow;",
            ">;"
        }
    .end annotation

    .prologue
    .line 310
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mFailedToShow:Ljava/util/Set;

    return-object v0
.end method

.method printFailedToShowComponents()V
    .locals 9

    .prologue
    .line 279
    iget-object v3, p0, Lcom/burstly/lib/component/ComponentQueue;->mFailedToShow:Ljava/util/Set;

    invoke-interface {v3}, Ljava/util/Set;->isEmpty()Z

    move-result v3

    if-nez v3, :cond_1

    .line 280
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    .line 281
    .local v2, sb:Ljava/lang/StringBuilder;
    iget-object v3, p0, Lcom/burstly/lib/component/ComponentQueue;->mFailedToShow:Ljava/util/Set;

    invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/FailedToShow;

    .line 282
    .local v0, comp:Lcom/burstly/lib/component/FailedToShow;
    invoke-virtual {v0}, Lcom/burstly/lib/component/FailedToShow;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "\n"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_0

    .line 284
    .end local v0           #comp:Lcom/burstly/lib/component/FailedToShow;
    :cond_0
    sget-object v3, Lcom/burstly/lib/component/ComponentQueue;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v4, "ComponentQueue"

    const-string v5, "Failed to show components are: {0}"

    const/4 v6, 0x1

    new-array v6, v6, [Ljava/lang/Object;

    const/4 v7, 0x0

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    aput-object v8, v6, v7

    invoke-virtual {v3, v4, v5, v6}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 286
    .end local v1           #i$:Ljava/util/Iterator;
    .end local v2           #sb:Ljava/lang/StringBuilder;
    :cond_1
    return-void
.end method

.method printUnshownComponents()V
    .locals 8

    .prologue
    const/4 v7, 0x0

    .line 263
    iget-object v3, p0, Lcom/burstly/lib/component/ComponentQueue;->mQueueElements:Ljava/util/LinkedList;

    invoke-virtual {v3}, Ljava/util/LinkedList;->isEmpty()Z

    move-result v3

    if-nez v3, :cond_1

    .line 264
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    .line 265
    .local v2, sb:Ljava/lang/StringBuilder;
    iget-object v3, p0, Lcom/burstly/lib/component/ComponentQueue;->mQueueElements:Ljava/util/LinkedList;

    invoke-virtual {v3}, Ljava/util/LinkedList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, i$:Ljava/util/Iterator;
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/ComponentQueueElement;

    .line 266
    .local v0, comp:Lcom/burstly/lib/component/ComponentQueueElement;
    invoke-virtual {v0}, Lcom/burstly/lib/component/ComponentQueueElement;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_0

    .line 268
    .end local v0           #comp:Lcom/burstly/lib/component/ComponentQueueElement;
    :cond_0
    sget-object v3, Lcom/burstly/lib/component/ComponentQueue;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v4, "ComponentQueue"

    const-string v5, "Components that were not shown because one of them had been already shown successfully: {0}"

    const/4 v6, 0x1

    new-array v6, v6, [Ljava/lang/Object;

    aput-object v2, v6, v7

    invoke-virtual {v3, v4, v5, v6}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 273
    .end local v1           #i$:Ljava/util/Iterator;
    .end local v2           #sb:Ljava/lang/StringBuilder;
    :goto_1
    return-void

    .line 271
    :cond_1
    sget-object v3, Lcom/burstly/lib/component/ComponentQueue;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v4, "ComponentQueue"

    const-string v5, "All advertise components were handled."

    new-array v6, v7, [Ljava/lang/Object;

    invoke-virtual {v3, v4, v5, v6}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    goto :goto_1
.end method

.method public setBurstlyAdListener(Lcom/burstly/lib/component/IInternalBurstlyAdListener;)V
    .locals 0
    .parameter "listener"

    .prologue
    .line 364
    iput-object p1, p0, Lcom/burstly/lib/component/ComponentQueue;->mBurstlyAdListener:Lcom/burstly/lib/component/IInternalBurstlyAdListener;

    .line 365
    return-void
.end method

.method public setComponentChangeListener(Lcom/burstly/lib/component/ComponentQueue$IQueueComponentListener;)V
    .locals 0
    .parameter "componentChangeListener"

    .prologue
    .line 337
    iput-object p1, p0, Lcom/burstly/lib/component/ComponentQueue;->mComponentQueueListener:Lcom/burstly/lib/component/ComponentQueue$IQueueComponentListener;

    .line 338
    return-void
.end method

.method public setCustomNetworkParams(Ljava/util/Map;)V
    .locals 0
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "*>;>;)V"
        }
    .end annotation

    .prologue
    .line 355
    .local p1, customNetworkParams:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;*>;>;"
    iput-object p1, p0, Lcom/burstly/lib/component/ComponentQueue;->mCustomNetworkParams:Ljava/util/Map;

    .line 356
    return-void
.end method

.method public setExplicitParams(Ljava/util/Map;)V
    .locals 0
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 346
    .local p1, clientTargetParams:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    iput-object p1, p0, Lcom/burstly/lib/component/ComponentQueue;->mClientTargetingParams:Ljava/util/Map;

    .line 347
    return-void
.end method

.method public setFaildToShowCollector(Ljava/util/Set;)V
    .locals 4
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Set",
            "<",
            "Lcom/burstly/lib/component/FailedToShow;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 319
    .local p1, newCollector:Ljava/util/Set;,"Ljava/util/Set<Lcom/burstly/lib/component/FailedToShow;>;"
    iput-object p1, p0, Lcom/burstly/lib/component/ComponentQueue;->mFailedToShow:Ljava/util/Set;

    .line 320
    sget-object v0, Lcom/burstly/lib/component/ComponentQueue;->LOG:Lcom/burstly/lib/util/LoggerExt;

    const-string v1, "ComponentQueue"

    const-string v2, "New failed to show items collector was set"

    const/4 v3, 0x0

    new-array v3, v3, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 321
    return-void
.end method

.method public setInterstitialMode(Z)V
    .locals 1
    .parameter "isInterstitial"

    .prologue
    .line 373
    invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    iput-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mIsInterstitial:Ljava/lang/Boolean;

    .line 374
    return-void
.end method

.method public stopQueue()V
    .locals 1

    .prologue
    .line 381
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mIsStopped:Z

    .line 382
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mQueueElements:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->clear()V

    .line 383
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

    if-eqz v0, :cond_0

    .line 384
    iget-object v0, p0, Lcom/burstly/lib/component/ComponentQueue;->mCurrentComponentController:Lcom/burstly/lib/component/IAdaptorController;

    invoke-interface {v0}, Lcom/burstly/lib/component/IAdaptorController;->stop()V

    .line 386
    :cond_0
    return-void
.end method
